// 根组件
import React, { Component } from "react";
// import { Button, message } from "antd";

// 引入路由
// import { HashRouter as Router, Route, Routes, BrowserRouter } from "react-router-dom";
// // 最新版中 Routes代替了switch
// import Login from "./pages/Login/login";
// import Admin from "./pages/Admin/admin";

import { RouterProvider } from 'react-router-dom'
import router from './router'

// 类继承式写法
export default class App extends Component {
  // handleClick = () => {
  //   message.success("成功啦...");
  // };
  // 虚拟dom
  render() {
    return (
      // 配置路由
      // <BrowserRouter>
      //   <Routes>
      //   <Route path="/login" element={<Login />}></Route>
      //   <Route path="/" element={<Admin />}></Route>
      // </Routes>
      // </BrowserRouter>
      <RouterProvider router={router} />
    );
  }
}
